package com.woniu.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.commons.exception.YogaException;
import com.woniu.model.dto.StudentDto;
import com.woniu.model.dto.UserByMyPersonalBaseDto;
import com.woniu.model.dto.UserByMyPersonalDto;
import com.woniu.model.dto.UserPersonalClassMarginDto;
import com.woniu.model.form.AddPersonalClassMarginForm;
import com.woniu.model.form.UserAndClassIdForm;
import com.woniu.model.model.YUserPersonalClassMargin;
import com.woniu.model.param.UserByMyPersonalParam;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author 吴彦祖
 * @since 2024年05月23日
 */
public interface YUserPersonalClassMarginService extends IService<YUserPersonalClassMargin> {

    Integer addPersonalClassMargin(AddPersonalClassMarginForm form);

    YUserPersonalClassMargin loadPersonalMarginByUserAndClassId(UserAndClassIdForm form);

    void substractPersonalMarginByUserAndClassId(Integer id);

    List<Integer> loadPersonalStudentIds(Integer coachId);

    List<StudentDto> loadPersonalStudent(Integer coachId);

    List<UserPersonalClassMarginDto> loadPersonalClassByCoachId(Integer coachId);


    /**
     * 通过用户token查该用户的私课
     *
     * @param param
     * @return
     */
    public  Page<UserByMyPersonalDto> userByMyPersonal(UserByMyPersonalParam param)throws YogaException;

    /**
     * 通过用户token查该用户的私课后，点击打开这个私课的详细信息
     *
     * @param
     * @return
     */
    UserByMyPersonalBaseDto userByMyPersonalBase(Integer userId);
}
